package org.example.multi_sys_consist.mapper;

import org.example.multi_sys_consist.pojo.entity.TransactionJob;

import java.util.List;

public interface TransactionJobMapper {

    void add(TransactionJob job);

    List<TransactionJob> selectList(int offset, int size);

    /**
     * update transaction_job set
     * error_message = #{errorMessage},
     * update_time = #{time}
     * retry_times = retry_times + 1 where id = #{id}
     */
    void updateError(Long id, String errorMessage, Long time);

    void updateSuccess(Long id, long l);
}
